package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysBillDetailsMapper;
import com.ruoyi.system.domain.SysBillDetails;
import com.ruoyi.system.service.ISysBillDetailsService;

/**
 * 账单明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-25
 */
@Service
public class SysBillDetailsServiceImpl implements ISysBillDetailsService 
{
    @Autowired
    private SysBillDetailsMapper sysBillDetailsMapper;

    /**
     * 查询账单明细
     * 
     * @param id 账单明细主键
     * @return 账单明细
     */
    @Override
    public SysBillDetails selectSysBillDetailsById(String id)
    {
        return sysBillDetailsMapper.selectSysBillDetailsById(id);
    }

    /**
     * 查询账单明细列表
     * 
     * @param sysBillDetails 账单明细
     * @return 账单明细
     */
    @Override
    public List<SysBillDetails> selectSysBillDetailsList(SysBillDetails sysBillDetails)
    {
        return sysBillDetailsMapper.selectSysBillDetailsList(sysBillDetails);
    }

    /**
     * 新增账单明细
     * 
     * @param sysBillDetails 账单明细
     * @return 结果
     */
    @Override
    public int insertSysBillDetails(SysBillDetails sysBillDetails)
    {
        sysBillDetails.setCreateTime(DateUtils.getNowDate());
        return sysBillDetailsMapper.insertSysBillDetails(sysBillDetails);
    }

    /**
     * 修改账单明细
     * 
     * @param sysBillDetails 账单明细
     * @return 结果
     */
    @Override
    public int updateSysBillDetails(SysBillDetails sysBillDetails)
    {
        sysBillDetails.setUpdateTime(DateUtils.getNowDate());
        return sysBillDetailsMapper.updateSysBillDetails(sysBillDetails);
    }

    /**
     * 批量删除账单明细
     * 
     * @param ids 需要删除的账单明细主键
     * @return 结果
     */
    @Override
    public int deleteSysBillDetailsByIds(String[] ids)
    {
        return sysBillDetailsMapper.deleteSysBillDetailsByIds(ids);
    }

    /**
     * 删除账单明细信息
     * 
     * @param id 账单明细主键
     * @return 结果
     */
    @Override
    public int deleteSysBillDetailsById(String id)
    {
        return sysBillDetailsMapper.deleteSysBillDetailsById(id);
    }
}
